using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;

using ILRuntime.CLR.TypeSystem;
using ILRuntime.CLR.Method;
using ILRuntime.Runtime.Enviorment;
using ILRuntime.Runtime.Intepreter;
using ILRuntime.Runtime.Stack;
using ILRuntime.Reflection;
using ILRuntime.CLR.Utils;
using System.Linq;

namespace ILRuntime.Runtime.Generated
{
    unsafe class AssetsVersion_Binding
    {
        public static void Register(ILRuntime.Runtime.Enviorment.AppDomain app)
        {
            BindingFlags flag = BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly;
            MethodBase method;
            FieldInfo field;
            Type[] args;
            Type type = typeof(global::AssetsVersion);

            field = type.GetField("assversion", flag);
            app.RegisterCLRFieldGetter(field, get_assversion_0);
            app.RegisterCLRFieldSetter(field, set_assversion_0);
            app.RegisterCLRFieldBinding(field, CopyToStack_assversion_0, AssignFromStack_assversion_0);
            field = type.GetField("firstpack", flag);
            app.RegisterCLRFieldGetter(field, get_firstpack_1);
            app.RegisterCLRFieldSetter(field, set_firstpack_1);
            app.RegisterCLRFieldBinding(field, CopyToStack_firstpack_1, AssignFromStack_firstpack_1);
            field = type.GetField("appversion", flag);
            app.RegisterCLRFieldGetter(field, get_appversion_2);
            app.RegisterCLRFieldSetter(field, set_appversion_2);
            app.RegisterCLRFieldBinding(field, CopyToStack_appversion_2, AssignFromStack_appversion_2);
            field = type.GetField("appsize", flag);
            app.RegisterCLRFieldGetter(field, get_appsize_3);
            app.RegisterCLRFieldSetter(field, set_appsize_3);
            app.RegisterCLRFieldBinding(field, CopyToStack_appsize_3, AssignFromStack_appsize_3);
            field = type.GetField("temp", flag);
            app.RegisterCLRFieldGetter(field, get_temp_4);
            app.RegisterCLRFieldSetter(field, set_temp_4);
            app.RegisterCLRFieldBinding(field, CopyToStack_temp_4, AssignFromStack_temp_4);


            app.RegisterCLRCreateDefaultInstance(type, () => new global::AssetsVersion());
            app.RegisterCLRCreateArrayInstance(type, s => new global::AssetsVersion[s]);

            args = new Type[]{};
            method = type.GetConstructor(flag, null, args, null);
            app.RegisterCLRMethodRedirection(method, Ctor_0);

        }



        static object get_assversion_0(ref object o)
        {
            return ((global::AssetsVersion)o).assversion;
        }

        static StackObject* CopyToStack_assversion_0(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((global::AssetsVersion)o).assversion;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_assversion_0(ref object o, object v)
        {
            ((global::AssetsVersion)o).assversion = (System.String)v;
        }

        static StackObject* AssignFromStack_assversion_0(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String @assversion = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((global::AssetsVersion)o).assversion = @assversion;
            return ptr_of_this_method;
        }

        static object get_firstpack_1(ref object o)
        {
            return ((global::AssetsVersion)o).firstpack;
        }

        static StackObject* CopyToStack_firstpack_1(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((global::AssetsVersion)o).firstpack;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_firstpack_1(ref object o, object v)
        {
            ((global::AssetsVersion)o).firstpack = (System.String)v;
        }

        static StackObject* AssignFromStack_firstpack_1(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String @firstpack = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((global::AssetsVersion)o).firstpack = @firstpack;
            return ptr_of_this_method;
        }

        static object get_appversion_2(ref object o)
        {
            return ((global::AssetsVersion)o).appversion;
        }

        static StackObject* CopyToStack_appversion_2(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((global::AssetsVersion)o).appversion;
            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }

        static void set_appversion_2(ref object o, object v)
        {
            ((global::AssetsVersion)o).appversion = (System.String)v;
        }

        static StackObject* AssignFromStack_appversion_2(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.String @appversion = (System.String)typeof(System.String).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack), (CLR.Utils.Extensions.TypeFlags)0);
            ((global::AssetsVersion)o).appversion = @appversion;
            return ptr_of_this_method;
        }

        static object get_appsize_3(ref object o)
        {
            return ((global::AssetsVersion)o).appsize;
        }

        static StackObject* CopyToStack_appsize_3(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((global::AssetsVersion)o).appsize;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_appsize_3(ref object o, object v)
        {
            ((global::AssetsVersion)o).appsize = (System.Int32)v;
        }

        static StackObject* AssignFromStack_appsize_3(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @appsize = ptr_of_this_method->Value;
            ((global::AssetsVersion)o).appsize = @appsize;
            return ptr_of_this_method;
        }

        static object get_temp_4(ref object o)
        {
            return ((global::AssetsVersion)o).temp;
        }

        static StackObject* CopyToStack_temp_4(ref object o, ILIntepreter __intp, StackObject* __ret, IList<object> __mStack)
        {
            var result_of_this_method = ((global::AssetsVersion)o).temp;
            __ret->ObjectType = ObjectTypes.Integer;
            __ret->Value = result_of_this_method;
            return __ret + 1;
        }

        static void set_temp_4(ref object o, object v)
        {
            ((global::AssetsVersion)o).temp = (System.Int32)v;
        }

        static StackObject* AssignFromStack_temp_4(ref object o, ILIntepreter __intp, StackObject* ptr_of_this_method, IList<object> __mStack)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            System.Int32 @temp = ptr_of_this_method->Value;
            ((global::AssetsVersion)o).temp = @temp;
            return ptr_of_this_method;
        }



        static StackObject* Ctor_0(ILIntepreter __intp, StackObject* __esp, IList<object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject* __ret = ILIntepreter.Minus(__esp, 0);

            var result_of_this_method = new global::AssetsVersion();

            return ILIntepreter.PushObject(__ret, __mStack, result_of_this_method);
        }


    }
}
